home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form WINSLIST
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "WinSlist 2.0"
- ClientHeight = 3576
- ClientLeft = 2016
- ClientTop = 2892
- ClientWidth = 6036
- ControlBox = 0 'False
- Height = 4128
- Left = 1968
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3576
- ScaleWidth = 6036
- Top = 2388
- Width = 6132
- Begin CommandButton Command5
- Caption = "&Bindery Info"
- Height = 435
- Left = 4320
- TabIndex = 9
- Top = 2784
- Width = 1575
- End
- Begin CommandButton Command4
- Caption = "&Volume Info"
- Height = 435
- Left = 2208
- TabIndex = 8
- Top = 2784
- Width = 1575
- End
- Begin CommandButton Command3
- Caption = "&Server Info"
- Height = 435
- Left = 144
- TabIndex = 7
- Top = 2784
- Width = 1575
- End
- Begin CommandButton Command2
- Caption = "&Exit"
- Height = 495
- Left = 4620
- TabIndex = 2
- Top = 2112
- Width = 1275
- End
- Begin CommandButton Command1
- Caption = "&ReScan"
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 2112
- Width = 1095
- End
- Begin ListBox ServerList
- Height = 1368
- Left = 120
- Sorted = -1 'True
- TabIndex = 0
- Top = 660
- Width = 5772
- End
- Begin Line Line2
- BorderColor = &H000000FF&
- X1 = 144
- X2 = 5904
- Y1 = 2688
- Y2 = 2688
- End
- Begin Line Line1
- X1 = 120
- X2 = 5880
- Y1 = 300
- Y2 = 300
- End
- Begin Label Label6
- BackStyle = 0 'Transparent
- Caption = "Label6"
- ForeColor = &H00FF0000&
- Height = 255
- Left = 3060
- TabIndex = 11
- Top = 360
- Width = 2835
- End
- Begin Label Label5
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Currently Selected Server:"
- Height = 255
- Left = 180
- TabIndex = 10
- Top = 360
- Width = 2715
- End
- Begin Label Label4
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "Select a Server then click an Action Button."
- Height = 252
- Left = 144
- TabIndex = 6
- Top = 3264
- Width = 5772
- End
- Begin Label Label3
- BackStyle = 0 'Transparent
- Caption = "Label 3"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 375
- Left = 3660
- TabIndex = 5
- Top = 2220
- Width = 855
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Total Servers:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H000000FF&
- Height = 375
- Left = 1440
- TabIndex = 4
- Top = 2220
- Width = 2115
- End
- Begin Label Label1
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "List of all Visible Netware Servers"
- Height = 315
- Left = 180
- TabIndex = 3
- Top = 60
- Width = 5655
- End
- Begin Menu about
- Caption = "&About"
- End
- Sub about_Click ()
- WinSlist.Hide
- aboutform.Show
- End Sub
- Sub Command1_Click ()
- ServerList.Clear
- Label3.Caption = "???"
- ScanForServers
- Label3.Caption = ServerList.ListCount
- ServerList.ListIndex = 0
- Label6.Caption = RTrim$(ServerList.List(ServerList.ListIndex))
- End Sub
- Sub Command2_Click ()
- End
- End Sub
- Sub Command3_Click ()
- ServerInfo.Show 1
- End Sub
- Sub Command4_Click ()
- VolInfo.Show 1
- ' MsgBox "Not yet written - Sorry", 0, "Look for it Later!!"
- End Sub
- Sub Command5_Click ()
- BindInfo.Show 1
- 'MsgBox "Not yet written - Sorry", 0, "Look for it Later!!"
- End Sub
- Sub Form_Load ()
- 'Center the Form
- Left = (Screen.Width - Width) / 2
- Top = (Screen.Height - Height) / 2
- 'Initialize some variables
- 'Used in MSGBox's and the about Box
- A_TAB = Chr$(9)
- CRLF = Chr$(13) + Chr$(10)
- ScanForServers
- Label3.Caption = ServerList.ListCount
- ServerList.ListIndex = 0
- Label6.Caption = RTrim$(ServerList.List(ServerList.ListIndex))
- End Sub
- Sub ScanForServers ()
- oID& = -1 'initialize object ID to -1 for first call to ScanBinderyObject
- Ret% = NWGetPrimaryConnectionID(ConnID%)
- Do
- serverName$ = String$(48, 0)
- cCode% = NWScanObject(ConnID%, "*", OT_FILE_SERVER, oID&, serverName$, oType%, oHasProps%, oFlag%, oSecurity%)
- If (cCode% = SUCCESSFUL) Then
- 'take all characters of object name up to terminating null
- serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
- ServerList.AddItem serverName$
- End If
- Loop Until cCode%
- End Sub
- Sub ServerList_Click ()
- Label6.Caption = RTrim$(ServerList.List(ServerList.ListIndex))
- End Sub
-